package com.karry.yl.service.baseinfo.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.karry.commons.base.impl.SuperServiceImpl;
import com.karry.yl.dao.baseinfo.CertificateMapper;
import com.karry.yl.domain.baseinfo.Certificate;
import com.karry.yl.service.baseinfo.CertificateService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service
@Transactional
public class CertificateServiceImpl extends SuperServiceImpl<CertificateMapper,Certificate> implements CertificateService {
    @Override
    public void save(Certificate cert) {
/*        if(cert.getType() <= 5){
            baseMapper.delete(new EntityWrapper<Certificate>().eq("orgId",cert.getOrgId()).eq("type",cert.getType()));
        }*/
        baseMapper.insert(cert);
    }
}
